package com.hoyue.system.bean;

import com.hoyue.classroom.bean.Score;

import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

/**
 * @author 空白
 * @version 1.0
 * Create by 2019/08/08 01:30
 */
public class User {

    // 用户id
    private Integer id;

    // 邮箱
    private String email;

    // 密码
    private String password;

    // 盐值
    private String salt;

    // 用户名
    private String userName;

    // 学校id
    private Integer schoolId;

    // 学生学号，如果是教师则空着
    private Integer studentNo;

    // qq
    private String qq;

    // 手机号码
    private String phone;

    // 性别
    private char sex;

    //  年级
    private String grade;

    // 学生成绩
    @Transient
    List<Score> scoreList;

    // 创建时间
    private Date createData;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(Integer schoolId) {
        this.schoolId = schoolId;
    }

    public Integer getStudentNo() {
        return studentNo;
    }

    public void setStudentNo(Integer studentNo) {
        this.studentNo = studentNo;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }

    public Date getCreateData() {
        return createData;
    }

    public void setCreateData(Date createData) {
        this.createData = createData;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public String getGrade() {
        return grade;
    }

    public List<Score> getScoreList() {
        return scoreList;
    }

    public void setScoreList(List<Score> scoreList) {
        this.scoreList = scoreList;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", email='" + email + '\'' +
                ", password='" + password + '\'' +
                ", salt='" + salt + '\'' +
                ", userName='" + userName + '\'' +
                ", schoolId=" + schoolId +
                ", studentNo=" + studentNo +
                ", qq='" + qq + '\'' +
                ", phone='" + phone + '\'' +
                ", sex=" + sex +
                ", createData=" + createData +
                '}';
    }
}
